package com.entity;



public class Comment extends BaseEntity{
//    private static final long serialVersionUID = 1L;

    private Student student;//所属学生


    private Goods goods;//评论的物品


    private String content;//评论内容


    private String replyTo;// 回复人或回复学生ID
    private Boolean approved = false; // 审核状态，默认未审核
    private Comment parent; // 父评论，用于回复功能
    private Boolean isReported = false; // 是否被举报，默认为 false

    public Student getStudent() {
        return student;
    }

    public void setStudent(Student student) {
        this.student = student;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getReplyTo() {
        return replyTo;
    }

    public void setReplyTo(String replyTo) {
        this.replyTo = replyTo;
    }

    public Boolean getApproved() {
        return approved;
    }

    public void setApproved(Boolean approved) {
        this.approved = approved;
    }

    public Comment getParent() {
        return parent;
    }

    public void setParent(Comment parent) {
        this.parent = parent;
    }

    public Boolean getReported() {
        return isReported;
    }

    public void setReported(Boolean reported) {
        isReported = reported;
    }

    @Override
    public String toString() {
        return "评论 [学生ID=" + (student != null ? student.getId() : null)
                + ", 物品ID=" + (goods != null ? goods.getId() : null)
                + ", 内容=" + content
                + (replyTo != null ? ", 回复=" + replyTo : "")
                + (parent != null ? ", 父评论ID=" + parent.getId() : "")
                + "]";
    }
}